#!/usr/bin/python
# coding:utf-8
import os

basedir = os.path.abspath(os.path.dirname(__file__))


class config(object):
    # key
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
    # flask-security
    SECURITY_LOGIN_URL = '/Api/v1/login/'
    SECURITY_LOGIN_SALT = 'something_super_secret_change_in_production'
    SECURITY_LOGOUT_URL = '/Api/v1/logout/'
    SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'
    SECURITY_PASSWORD_SALT = 'something_super_secret_change_in_production'
    SECURITY_TOKEN_AUTHENTICATION_HEADER = 'Authorization'
    SECURITY_TOKEN_MAX_AGE = 86400
    SECURITY_TOKEN_SALT = 'something_super_secret_change_in_production'
    SECURITY_TRACKABLE = True
    SECURITY_UNAUTHORIZED_VIEW = '/'

    AUTH_HEADER_NAME = 'authentication-token'
    # wtf
    WTF_CSRF_ENABLED = False
    # restfull defalt base url
    RESFUL_DEFAULT_URL = '/api/v1'
    # sqlalchemy
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_RECORD_QUERIES = False
    SQLALCHEMY_TRACK_MODIFICATIONS = True

    @staticmethod
    def init_app(app):
        pass
